/**
 * 设置选区的操作
 * 
 */

import { Operation } from "./operation"
export class SetSelectionOperation extends Operation {
    selection_;
    /**
     * 
     * @param {*} selection 选区：即选中的区域
     */
    constructor (selection) {
        super()
        this.selection_ = selection
    }
    // 对这个原子操作执行
    apply (editor) {
        editor.getSelectionModel().setSelection(this.selection_)
    }
}
export default SetSelectionOperation